import { createRouter, createWebHistory } from 'vue-router'
import Dashboard from '../views/Dashboard.vue'
import CategoryAnalysis from '../views/CategoryAnalysis.vue'
import PriceAnalysis from '../views/PriceAnalysis.vue'
import DataQuery from '../views/DataQuery.vue'
import SystemMonitor from '../views/SystemMonitor.vue'
import UserManagement from '../views/UserManagement.vue'

const routes = [
  {
    path: '/',
    name: 'Dashboard',
    component: Dashboard,
    meta: { title: '数据总览' }
  },
  {
    path: '/category',
    name: 'CategoryAnalysis',
    component: CategoryAnalysis,
    meta: { title: '分类数据统计' }
  },
  {
    path: '/price',
    name: 'PriceAnalysis',
    component: PriceAnalysis,
    meta: { title: '价格分析' }
  },
  {
    path: '/query',
    name: 'DataQuery',
    component: DataQuery,
    meta: { title: '数据查询' }
  },
  {
    path: '/monitor',
    name: 'SystemMonitor',
    component: SystemMonitor,
    meta: { title: '系统监控' }
  },
  {
    path: '/users',
    name: 'UserManagement',
    component: UserManagement,
    meta: { title: '用户管理' }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 